# 引用 requests文件
import requests
from com.power.auto.test.config.EnvManager import *


# 下载地址
def download_file(url, file_name):
    # 把下载地址发送给requests模块
    f = requests.get(url)
    file = EnvManager.get_lib_path() + file_name
    # 下载文件
    with open(file, "wb") as code:
        code.write(f.content)
    return file
